package com.appspot.itunegwt.client.gin;

import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
import com.gwtplatform.mvp.client.gin.DefaultModule;
import com.appspot.itunegwt.client.place.ClientPlaceManager;
import com.appspot.itunegwt.client.layout.AppPresenter;
import com.appspot.itunegwt.client.layout.AppView;
import com.appspot.itunegwt.client.mvp.DefaultPresenter;
import com.appspot.itunegwt.client.mvp.DefaultView;
import com.appspot.itunegwt.client.place.DefaultPlace;
import com.appspot.itunegwt.client.place.NameTokens;

public class ClientModule extends AbstractPresenterModule {

	@Override
	protected void configure() {
		install(new DefaultModule(ClientPlaceManager.class));

		bindPresenter(AppPresenter.class, AppPresenter.MyView.class,
				AppView.class, AppPresenter.MyProxy.class);

		bindPresenter(DefaultPresenter.class, DefaultPresenter.MyView.class,
				DefaultView.class, DefaultPresenter.MyProxy.class);

		bindConstant().annotatedWith(DefaultPlace.class).to(NameTokens.index);
	}
}
